// --------------------------------------------------------------------------------------------------------------------- 
// <copyright file="ProductLinearRegression.cs" company="Scrum for Team System">
//   None
// </copyright>
// <summary>
//   Specialised version of LinearRegression for use by the Product Burndown chart.
// </summary>
// ---------------------------------------------------------------------------------------------------------------------

namespace ScrumForTeamSystem.Metrics
{
    /// <summary>
    /// Specialised version of LinearRegression for use by the Product Burndown chart.
    /// </summary>
    internal class ProductLinearRegression : LinearRegression
    {
        /// <summary>
        /// Gets a Trend point. Overrides the base class so that the original Data is not stored.
        /// </summary>
        /// <returns>
        /// A Trend point.
        /// </returns>
        public override double? GetNextTrendValue()
        {
            return this.YIntercept + (this.Slope * ++this.PointCount);

            // NB: PointCount is incremented before being used to skip the zero'th element
        }
    }
}